export interface IMenuRoute {
    name: string;
    value: string;
}
export const getMenuList = (): IMenuRoute[] => {
    let files = import.meta.glob("@/views/**/**.vue");
    let menuList: IMenuRoute[] = [];
    for (let file in files) {
        if (!file.includes("components")) {
            let filePath = file.substring(0, file.lastIndexOf("/"));
            let fileName = filePath.substring(filePath.lastIndexOf("/") + 1);
            let path = file.substring(10, file.lastIndexOf(".vue"));
            menuList.push({
                name: fileName,
                value: path,
            });
        }
    }
    return menuList;
};
